﻿''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Magic Content - A desktopmodule to publish content and send out
' newsletters from within the DotNetNuke® Portal Framework
'
'
' Copyright(c) 2005-2006 proeder.network.consult
' Philipp Becker (philipp.becker@portalfabrik.net)
' Internet: http://www.portalfabrik.net
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Imports System
Imports System.Data

Namespace dnnWerk.Modules.Nuntio.Content

    Public Class ContentLogInfo

        Implements DotNetNuke.Entities.Modules.IHydratable

#Region "Private Members"

        'internal members
        Private _entryId As Int32
        Private _contentId As Int32
        Private _createdDate As DateTime
        Private _createdBy As Int32
        Private _userComment As String
        Private _comment As String
        Private _moduleId As Int32

        'hydrated members
        Private _title As String
        Private _content As String
        Private _version As Integer
        Private _locale As String

#End Region

#Region "Constructors"

        Public Sub New()
        End Sub

#End Region

#Region "Public Properties"
        Public Property EntryId() As Int32
            Get
                Return _entryId
            End Get
            Set(ByVal Value As Int32)
                _entryId = Value
            End Set
        End Property

        Public Property ContentId() As Int32
            Get
                Return _contentId
            End Get
            Set(ByVal Value As Int32)
                _contentId = Value
            End Set
        End Property

        Public Property CreatedDate() As DateTime
            Get
                Return _createdDate
            End Get
            Set(ByVal Value As DateTime)
                _createdDate = Value
            End Set
        End Property

        Public Property CreatedBy() As Int32
            Get
                Return _createdBy
            End Get
            Set(ByVal Value As Int32)
                _createdBy = Value
            End Set
        End Property

        Public Property UserComment() As String
            Get
                Return _userComment
            End Get
            Set(ByVal Value As String)
                _userComment = Value
            End Set
        End Property

        Public Property Comment() As String
            Get
                Return _comment
            End Get
            Set(ByVal Value As String)
                _comment = Value
            End Set
        End Property

        Public Property ModuleId() As Int32
            Get
                Return _moduleId
            End Get
            Set(ByVal Value As Int32)
                _moduleId = Value
            End Set
        End Property

        'hydrated members

        Public ReadOnly Property Title() As String
            Get
                Return _title
            End Get
        End Property

        Public ReadOnly Property Content() As String
            Get
                Return _content
            End Get
        End Property

        Public ReadOnly Property Version() As Integer
            Get
                Return _version
            End Get
        End Property

        Public ReadOnly Property Locale() As String
            Get
                Return _locale
            End Get
        End Property

        Public Sub Fill(ByVal dr As System.Data.IDataReader) Implements DotNetNuke.Entities.Modules.IHydratable.Fill
            Try
                ContentId = Convert.ToInt32(dr("ContentId"))
            Catch
            End Try
            Try
                CreatedDate = Convert.ToDateTime(dr("CreatedDate"))
            Catch
            End Try
            Try
                CreatedBy = Convert.ToInt32(dr("CreatedBy"))
            Catch
            End Try
            Try
                UserComment = Convert.ToString(dr("UserComment"))
            Catch
            End Try
            Try
                Comment = Convert.ToString(dr("Comment"))
            Catch
            End Try
            Try
                ModuleId = Convert.ToInt32(dr("ModuleId"))
            Catch
            End Try
            Try
                EntryId = Convert.ToInt32(dr("EntryId"))
            Catch
            End Try
            Try
                _content = Convert.ToString(dr("Content"))
            Catch
            End Try
            Try
                _title = Convert.ToString(dr("Title"))
            Catch
            End Try
            Try
                _locale = Convert.ToString(dr("Locale"))
            Catch
            End Try
            Try
                _version = Convert.ToInt32(dr("Version"))
            Catch
            End Try
        End Sub

        Public Property KeyID() As Integer Implements DotNetNuke.Entities.Modules.IHydratable.KeyID
            Get
                Return _entryId
            End Get
            Set(ByVal value As Integer)
                _entryId = value
            End Set
        End Property

#End Region

    End Class

End Namespace
